﻿<%@ Page Language="C#" MasterPageFile="~/View/Shared/RightFrame.Master" AutoEventWireup="true" CodeBehind="Role.aspx.cs" Inherits="Hisun.View.Admin.Role" Title="无标题页" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentHolder" runat="server">
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="角色ID" 
        DataSourceID="LinqDataSource1">
        <Columns>
            <asp:HyperLinkField DataNavigateUrlFields="角色ID" 
                DataNavigateUrlFormatString="ModifyAuthsInRole.aspx?roleID={0}" 
                DataTextField="角色名称" DataTextFormatString="编辑{0}拥有的权限" />
            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
            <asp:BoundField DataField="角色ID" HeaderText="角色ID" InsertVisible="False" 
                ReadOnly="True" SortExpression="角色ID" />
            <asp:BoundField DataField="角色名称" HeaderText="角色名称" SortExpression="角色名称" />
            <asp:CheckBoxField DataField="系统角色" HeaderText="系统角色" SortExpression="系统角色" />
            <asp:CheckBoxField DataField="用户角色" HeaderText="用户角色" SortExpression="用户角色" />
            <asp:BoundField DataField="权限ID" HeaderText="权限ID" SortExpression="权限ID" 
                InsertVisible="False" ReadOnly="True" />
        </Columns>
    </asp:GridView>
    <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
        DataKeyNames="角色ID" DataSourceID="LinqDataSource2" DefaultMode="Insert" 
        Height="50px" onmodechanged="DetailsView1_ModeChanged" Width="100%" 
        oniteminserting="DetailsView1_ItemInserting">
        <Fields>
            <asp:BoundField DataField="角色ID" HeaderText="角色ID" InsertVisible="False" 
                ReadOnly="True" SortExpression="角色ID" />
            <asp:BoundField DataField="角色名称" HeaderText="角色名称" SortExpression="角色名称" />
            <asp:CheckBoxField DataField="系统角色" HeaderText="系统角色" SortExpression="系统角色" />
            <asp:CheckBoxField DataField="用户角色" HeaderText="用户角色" SortExpression="用户角色" />
            <asp:CommandField ShowInsertButton="True" />
        </Fields>
    </asp:DetailsView>
    <asp:LinqDataSource ID="LinqDataSource2" runat="server" 
        ContextTypeName="Hisun.Models.HisunDBDataContext" EnableInsert="True" 
        TableName="TSCRB_JS_Roles">
    </asp:LinqDataSource>
    <br />
    <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
        ContextTypeName="Hisun.Models.HisunDBDataContext" EnableDelete="True" 
        EnableInsert="True" EnableUpdate="True" TableName="TSCRB_JS_Roles">
    </asp:LinqDataSource>
</asp:Content>
